<?php 

function smarty_function_f($params, $smarty)
{
	$size = $params['data'];
	if($size>pow(1024,3)){
		return round($size/pow(1024,3),1)."GB";
	}elseif($size>pow(1024,2)){
		return round($size/pow(1024,2),1)."MB";
	}elseif($size>pow(1024,1)){
		return round($size/pow(1024,1),1)."KB";
	}else{
		return $size."B";
	}

}

















 ?>